//
//  PersonalCenterCell.m
//  QingBrushTopic
//
//  Created by Zheng on 2017/10/8.
//  Copyright © 2017年 Zheng. All rights reserved.
//

#import "PersonalCenterCell.h"

@implementation PersonalCenterCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        self.selectionStyle = UITableViewCellSelectionStyleNone;
        
        [self.contentView addSubview:self.iconImgv];
        [self.contentView addSubview:self.titleLbl];
        [self.contentView addSubview:self.markImgv];
        
        [_iconImgv mas_makeConstraints:^(MASConstraintMaker *make) {
            make.height.width.mas_equalTo(kCX_Scale(32));
            make.left.mas_equalTo(kCX_Scale(15));
            make.centerY.equalTo(self);
        }];
        
        [_titleLbl mas_makeConstraints:^(MASConstraintMaker *make) {
            make.left.equalTo(_iconImgv.mas_right).offset(kCX_Scale(12));
            make.centerY.equalTo(self);
        }];
        
        [_markImgv mas_makeConstraints:^(MASConstraintMaker *make) {
            make.height.width.mas_equalTo(kCX_Scale(32));
            make.right.mas_equalTo(-(kSCREEN_WIDTH-kCX_Scale(280)));
            make.centerY.equalTo(self);
        }];
    }
    return self;
}

- (UIImageView *)iconImgv {
    if (!_iconImgv) {
        _iconImgv = [[UIImageView alloc] init];
    }
    return _iconImgv;
}

- (UILabel *)titleLbl {
    if (!_titleLbl) {
        _titleLbl = [[UILabel alloc] init];
        _titleLbl.font = kMyFont(19);
        _titleLbl.textColor = [UIColor darkGrayColor];
    }
    return _titleLbl;
}

- (UIImageView *)markImgv {
    if (!_markImgv) {
        _markImgv = [[UIImageView alloc] init];
    }
    return _markImgv;
}

@end
